<?php if (!isset($_SESSION)) {
  session_start();
}?>
<?php require_once('Connections/microassur.php'); ?>
<?php   function strToNoAccent($var) 
   {
    $var = str_replace(
     array(
      "à", "â", "ä", "á", "ã", "å",
      "î", "ï", "ì", "í", 
      "ô", "ö", "ò", "ó", "õ", "ø", 
      "ù", "û", "ü", "ú", 
      "é", "è", "ê", "ë", 
      "ç", "ÿ", "ñ","'",
      "‘",
     ),
     array(
      'a', 'a', 'a', 'a', 'a', 'a', 
      'i', 'i', 'i', 'i', 
      'o', 'o', 'o', 'o', 'o', 'o', 
      'u', 'u', 'u', 'u', 
      'e', 'e', 'e', 'e', 
      'Ç', 'Y', 'n','&#8217;',
      '&#8217;',
     ),$var);
    return $var;
   }
   
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_rs = "-1";
if (isset($_SESSION['MM_UserGroup'])) {
  $colname_rs = $_SESSION['MM_UserGroup'];
}
mysql_select_db($database_microassur, $microassur);
$query_rs = sprintf("SELECT * FROM habilitation WHERE Identifiant_profil = %s", GetSQLValueString($colname_rs, "int"));
$rs = mysql_query($query_rs, $microassur) or die(mysql_error());
$row_rs = mysql_fetch_assoc($rs);
$totalRows_rs = mysql_num_rows($rs);

?>
<table border="1" align="center">
  
 <tr>     
     <?php do { ?> <td><a href="<?php $str1=strToNoAccent($row_rs['Libelle_evenement']); $str=strtolower($str1); echo $str.'/index.php'?>"><?php echo $row_rs['Libelle_evenement']; ?></a></td><?php } while ($row_rs = mysql_fetch_assoc($rs)); ?>
    </tr>
</table>
<?php mysql_free_result($rs);?>
 